package org.example.chat.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;

import java.sql.Timestamp;
import java.lang.String;
import java.lang.Integer;

/**
 * 消息表 实体类。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Table(value = "chat_message", dataSource = "chatDS")
public class ChatMessageEntity {

    /**
     * 消息ID（UUID）
     */
    @Id(keyType = KeyType.Auto)
    private String messageId;

    /**
     * 消息类型：0-私聊, 1-群组, 2-广播, 3-系统
     */
    @Column(value = "type")
    private Integer type;

    /**
     * 发送者ID
     */
    @Column(value = "sender_id")
    private String senderId;

    /**
     * 接收者ID（用户ID或群组ID）
     */
    @Column(value = "target_id")
    private String targetId;

    /**
     * 消息内容
     */
    @Column(value = "content")
    private String content;

    /**
     * 内容类型：TEXT, IMAGE, FILE, VIDEO, AUDIO
     */
    @Column(value = "content_type")
    private String contentType;

    /**
     * 消息状态：0-已发送, 1-已送达, 2-已读
     */
    @Column(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @Column(value = "created_at")
    private Timestamp createdAt;


    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getSenderId() {
        return senderId;
    }

    public void setSenderId(String senderId) {
        this.senderId = senderId;
    }

    public String getTargetId() {
        return targetId;
    }

    public void setTargetId(String targetId) {
        this.targetId = targetId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }
}
